﻿using DevExpress.ExpressApp;
using DevExpress.ExpressApp.DC;
using EasyXaf.LowCode.WorkflowEditors.Models.Activities;

namespace EasyXaf.LowCode.WorkflowEditors.Models;

public sealed class LowCodeWorkflowEditorsModelsModule : ModuleBase
{
    public override void CustomizeTypesInfo(ITypesInfo typesInfo)
    {
        base.CustomizeTypesInfo(typesInfo);

        ActivityGroupRegistrator.RegisterActivityGroup(new ActivityGroup
        {
            Name = ActivityGroupConsts.CommonGroupName,
            Caption = "常规",
            IsExpand = true,
            Order = 10,
        });

        ActivityGroupRegistrator.RegisterActivityGroup(new ActivityGroup
        {
            Name = ActivityGroupConsts.ExceptionGroupName,
            Caption = "异常",
            Order = 20,
        });

        ActivityGroupRegistrator.RegisterActivityGroup(new ActivityGroup
        {
            Name = ActivityGroupConsts.DebugGroupName,
            Caption = "调试",
            Order = 30,
        });

        ActivityGroupRegistrator.RegisterActivityGroup(new ActivityGroup
        {
            Name = ActivityGroupConsts.AnnotationGroupName,
            Caption = "注释",
            Order = 40,
        });

        ActivityGroupRegistrator.RegisterActivityGroup(new ActivityGroup
        {
            Name = ActivityGroupConsts.OtherGroupName,
            Caption = "其它",
            Order = int.MaxValue,
        });
    }
}
